Method and apparatus for detecting one or more predetermined tones transmitted over a communication network

ABSTRACT

A gateway includes a network interface and an apparatus for detecting predetermined tones The apparatus includes an input to receive a signal transmitted over the network interface, a frequency divider to divide the signal into two different components, each component being associated with a different frequency sub band, wherein each frequency sub band is selected to include a predetermined frequency of a predetermined tone, a frequency discriminator to determine frequencies of tones in the components, and a decision logic block to provide an indication that a first predetermined tone has been detected when a first determined frequency of a first tone in a first component corresponds to a first predetermined frequency of the first tone.

RELATED APPLICATION(S)

This application is a divisional of U.S. patent application Ser. No.13/003,311, entitled “METHOD AND APPARATUS FOR DETECTING ONE OR MOREPREDETERMINED TONES TRANSMITTED OVER A COMMUNICATION NETWORK,” filed onJan. 10, 2011, which is a National Stage Entry under 37 C.F.R. §371 ofPCT/IB2008/052843, filed Jul. 16, 2008, the disclosures of which arehereby expressly incorporated by reference in their entirety.

DESCRIPTION

1. Field of the Invention

This invention relates to a method and apparatus for detecting one ormore predetermined tones transmitted over a communication network.

2. Background of the Invention

As the number of communication networks such as PSTN, ATM networks, IPnetworks or PBX increases and with the desire to be able to communicatebetween the different communication networks, a unit known as a mediagateway unit has been developed that acts as a translation unit withcommunication (such as voice or data calls) from one communicationnetwork being connected to another communication network through themedia gateway unit. The media gateway unit performs a conversion betweenthe different transmission and coding techniques of the differentcommunication networks. Thus, for example, a data call from a data modemin an IP network would connect to a data modem in the PSTN networkthrough a media gateway unit and the media gateway unit converts thedata signals between their state in the IP network and the staterequired for transmission over the PSTN network.

The media gateway unit can operate in a number of different modesdepending on which networks are to be connected through the mediagateway unit. For example, for a data call between an IP network and aPSTN network, the media gateway unit switches to a mode in which encodeddata from the IP network is decoded and then sent to the PSTN networkand vice versa.

In communication networks supporting speech or voice communication, suchas PSTN or IP, devices such as CODECs, vocoders, echo suppressors andecho cancellers are used in the network to perform telephone processingfunctions for speech or voice signals. For example, echo cancellers areused to reduce and attempt to eliminate echoes formed when a speechsignal from a user coupled to a local subscriber loop at one endtraverses the PSTN to a user coupled to a local subscriber loop atanother end. In such networks, a voice connection can also be used fordata transmission (e.g. between a modem, facsimile, etc.) and the datatransmitted over a voice connection is known as voiceband data. Thesignal characteristics are however different for voice and voicebanddata and transmitting them requires different approaches. For example,for data communication between data enabled devices (e.g. data modems),over a network which support voice communication (for example, one modembeing part of a PSTN and another to an IP network), as the data signalis passed through the vocoders in the PSTN or IP network, the datasignal becomes distorted and the modems cannot communicate: the lowbit-rate vocoders (e.g. G.723.1, G.729) commonly used for voicetransmission in IP networks are designed and focused to handle voicesignals and do not provide a reliable method for transmitting data.

Several mechanisms are used to improve the reliability of thetransmission of voiceband data (VBD) and one of the simplest, known asthe VBD switch, when the media gateway unit switches to a VBD mode, isto detect the voiceband data and to then bypass the vocoder processing.The mode of the media gateway unit is determined by signalling or set upinformation received at the media gateway unit such as PSTN signallinginformation, IP signalling information or modem or fax tones.

The switching of the media gateway unit to a mode may trigger certainevents in the media gateway unit. Thus, when the media gateway unitdetermines from the signalling or set up information that a data call isto be made across a communication network supporting voice and dataservices, such as a PSTN network, the media gateway unit switches modeto the VBD mode and on entering that mode an event is triggered todisable the voice processing devices in the PSTN network, such as theecho cancellers, so that the data signal is not distorted. Similarly,for data communication through the media gateway unit and over an IPnetwork, when the media gateway unit determines from the signalling orset up information that a data call is to be made across an IP network,the media gateway unit switches mode and on entering that mode an eventis triggered to disable the IP vocoder which encodes the data accordingto the IP protocol so that uncoded data may be passed through the mediagateway unit.

In order to detect that data communication has been initiated, the mediagateway unit typically comprises a module which detects when a datacommunication has been initiated over a communication network, e.g. whena modem connects to a PSTN line and tries to communicate, and dependingon the output of the module the media gateway unit is arranged totrigger certain events e.g. disable the echo cancellers and suppressorsor IP vocoders. This is achieved by the module being arranged to detecta certain type of set up signal which is used to initiate datacommunication and which is typically known as a tone. Fax/modem tonesfor initiating data communications are defined in ITU standards such asV.21, V.22/V.22bis, V.23, V.27, V.29, V.17, V.32/V.32bis, V.34, V.34 HD,V.90, V.92, Bell standards such as Bell 202, Bell 212 and SecurityIndustry Association (SIA) standards such as SIA DC-02, SIA DC-05.

For example, the answer tone signals ANS, ANSam sent by an answeringdevice are defined by ITU standards, ITU-T V.8 and ITU-T V.25, and in abasic form the answer tone signal is a single continuous tone with afrequency of 2100 Hz±15 Hz and a duration of 3.3±0.7 seconds. Asdescribed in these ITU standards, the answer tone may include 180° phasereversals at predetermined intervals, such as 425 to 475 ms, which isused by the media gateway unit to disable network echo cancellers.

U.S. Pat. No. 7,003,093 describes a tone detection processor whichdiscriminates between tone and voice signals and determines the tones.The tone detection processor performs automatic gain control (AGC) tonormalize the power of the tone or voice signal. Further, the energy ofthe tone or voice signals are determined at specific frequenciesutilizing a Goertzel Filter process which implements a plurality ofGoertzel filters. The tone detection processor determines whether or nota tone is present from the two maximum energy levels of the Goertzelfiltered tone and if a tone exits, determines the type of tone. However,the tone detection method described in this patent is not very accuratesince it only uses a Goertzel Filter process. This means that a high(approx 100%) Call Connect Reliability (CCR) for all standard types oftelephone lines (EIA 1-7, ETSI1 and ETSI2) is not achievable. Inaddition, additional processing overhead is required by the use of AGC.

In addition to all the different tones defined by the differentstandards, different data enabled devices from different manufacturersfor a particular standard will generate different versions of the tonesdefined in the standard. This is due to the different designs andcomponents used in the devices. For example, in the case of devicesdesigned to generate the ANS tone, some devices will generate ‘cleaner’(e.g. with less noise) ANS tones than other devices.

Typically, current tone detection modules are designed to detected onlyone tone or more than one tone when the tones occur at the same time,e.g. in the case when a normal transmitted tone from one modem occurs atthe same time as the echo of the other modem's signal, the currentdetection modules will detect both tones. However, if the media gatewayunit receives a tone for which the tone detection module is not designedto receive, the tone will go undetected and the data connection willfail.

Some tone detection modules are designed based on simulated data and donot take account of affects that arise when the modules are used in reallife situations. For example, attenuation effects and cross-talk noiseproduced by subscriber lines between the device and the media gatewayunit can distort the tone to such an extent that when it is processed bythe tone detection module, the tone is not detected and the dataconnection will fail.

European patent application no. EP-A-1395065 describes a tone detectorfor detecting multicomponent DTMF tones for various tone formats. Themethod described in this patent application uses comb filters tuned to aparticular frequency in order to have a single frequency for each of theAM-FM demodulators. Teager-Kaiser energy operators are then used forAM-FM discrimination. The method described is very sensitive to noiseand distortions and so the detection reliability will dropsignificantly. Furthermore, since a multiple adaptation mechanism isused, the detection method described in this application issignificantly slow. U.S. Pat. No. 7,242,762 describes a similar tonedetection method.

U.S. Pat. No. 6,708,146 describes a voiceband signal classifier whichdetermines which class of voiceband traffic is being carried by aconnection over a communication network. The voiceband classes mayinclude idle channels, voice signals, and voiceband data signals such asmodem and fax signals. The method disclosed in this patent uses anautocorrelation method, probability density functions and other signalprocessing techniques and is focused on classifying traffic once anongoing modulated connection has been set-up in order to discriminatethe type of connection. In view of the time the method described in thispatent requires to discriminate the ongoing call, such a method is notsuitable for detecting tone set-up signals which requires the tone to bedetected and the mode switched prior to the actual transmission of data,which may be in the range of 50-100 ms for V.22 fast-connect, otherwisethe connection will fail. The amount of time required to detect the toneand switch to VBD in order to still have a successful connection varies.It can be as low as 50-100 ms for V.22 fast-connect and it can be aslarge as seconds (2-3 seconds) for V.32, V.34, V.90, V.92 (all the modemconnections starting with either ANS or ANSam).

SUMMARY OF THE INVENTION

The present invention provides a method and apparatus for detecting oneor more tones transmitted over a communication network as described inthe accompanying claims.

Specific embodiments of the invention are set forth in the dependentclaims.

These and other aspects of the disclosure will be apparent from andelucidated with reference to the embodiments described hereinafter.

BRIEF DESCRIPTION OF THE DRAWINGS

Further details, aspects and embodiments of the disclosure will bedescribed, by way of example only, with reference to the drawings.Elements in the figures are illustrated for simplicity and clarity andhave not necessarily been drawn to scale.

FIG. 1 is a block schematic diagram of a communication system comprisinga plurality of communication networks connected by a plurality of mediagateway units, each of the media gateway units including apparatus fordetecting one or more tones in accordance with an embodiment of thedisclosure;

FIG. 2 is a block schematic diagram of an apparatus for detecting one ormore tones in accordance with an embodiment of the disclosure;

FIG. 3 is a graphical representation showing examples of different tonesthat may be received on initiation of data communications between two ofthe communication units of FIG. 1; and

FIGS. 4 and 5 are schematic diagrams illustrating in more detail themethod and apparatus for detecting one or more tones in accordance withan embodiment of the disclosure.

DETAILED DESCRIPTION OF THE DRAWINGS

The present invention will be described with reference to detecting oneor more tones. However, it will be appreciated that the presentinvention may be used to detect any set up or handshake signals for datacommunication, including a fax tone, Call Tone (CT), V.32 AA tone andsimilar set up signals in, for example, any packet based telephony mediagateway unit or similar apparatus.

Referring firstly to FIG. 1, a communication system 1 comprises aplurality of communication networks, including for example a privatebranch exchange (PBX) network 4, an IP network 6 and a PSTN network 8,and a plurality of media gateway units 2 for connecting the plurality ofcommunication networks 4, 6, 8 and enabling communication between thedifferent networks over communication links 3, 13 and 15. The pluralityof media gateway units 2, 20, 200 may be part of a communication network11, such as an IP network, and thus, the plurality of media gatewayunits 2 communicate with each other as necessary via the IP network 11.Each communication network 4, 6, 8 supports data communication from datadevices or data enabled devices: for the PBX network 4, the data devices5 may include data modems, facsimile devices; for the IP network 6, thedata devices 7 may include IP video phones, computers; and for the PSTNnetwork 8, the data devices 9 may include Digital Subscriber Line (DSL)modems or facsimile devices, ATMs. The data communicated over thenetworks 4, 6, 8 may include video, voice, SMS, email, multimedia orother types of data. In an alternative arrangement (not shown), a singlemedia gateway unit may connect the plurality of communication networks4, 6, 8 via a plurality of channels (not shown) and enable communicationbetween the different networks.

Each media gateway unit 2, 20, 200 typically comprises a media gatewaycontroller (not shown) and an apparatus 10 for detecting one or moretones in accordance with an embodiment of the disclosure. The apparatus10 may be part of the media gateway controller or separate to the mediagateway controller. Although the apparatus 10 will be described as beingpart of the media gateway unit 2, 20, 200, it will be appreciate thatthe apparatus 10 may, additionally or alternatively, be part of a datadevice in a network such as a fax/modem relay. In the case when theapparatus 10 is part of a data device, it may be used to detect ananswer tone signal from another data device in the same or differentcommunication networks so that data communication can be set up betweenthe two data devices.

In an embodiment shown in FIG. 2, the apparatus 10 comprises aprocessing unit 12, data memory 14 and program memory 17. The processingunit 12 may be a single processor, such as the StarCore DSP devicesupplied by Freescale Semiconductor, Inc. or may comprise two or moreprocessors. The number of processors and the allocation of processingfunctions to the processors is a matter of design choice for a skilledperson. The program memory 17 of the apparatus 10 stores programscontaining processor instructions for operation of the processing unit12. The programs may contain a number of different program elements orsub-routines containing processor instructions for a variety ofdifferent tasks. Specific program elements stored in program memory 17include a tone detection program element 18. More details of theoperation of this tone detection program element 18 will be describedbelow.

To illustrate the operation of the communication system 1, lets considerthe situation when a data modem in the IP network 6 connects to a datamodem in the PSTN network 8 to exchange data, with the data modem 7 inthe IP network 6 being the originator of the data exchange (or callerside) and the data modem 9 in the PSTN network 8 being the terminator ofthe data exchange (or answer side). The communication path is routedthrough the media gateway unit 20 connected to the IP network 6 andthrough the media gateway unit 200 connected to the PSTN network 8. Theinitial transmission sequence consists of the originator modem 7 sendinga set up signal named Call Tone signal CT (CT 300 at −13 dBm0 (power indBm measured at a zero transmission level point) in FIG. 3), and theterminator modem 9 detecting this set up signal and responding with aset up signal named answer tone signal ANSam (ANSam 302 at −18 dBm0 inFIG. 3). In the embodiment shown in FIG. 3, a further handshake signal(V.32AA 304 at −13 dBm0 in FIG. 3) is then sent by the originating modem7. This further signal is sent by the originating modem and provides thelast chance of having a successful connection. Failure to detect thebeginning of this tone will result in a failed modem connection.Usually, the signals transmitted over the IP network 6 are coded usinglow-bit vocoders which are designed for handling voice signals. Themedia gateway unit 20 receives the signals from the IP network 6 anddecodes them according to the vocoder type into a linear (uncoded)format, or low-compression formats like G.711, A-law, or μ-law. Thesignals received from PSTN network 8 that are to be sent to the IPnetwork 6 will be first encoded by the media gateway unit 200 using oneof the above mentioned low-bit vocoders and sent to the IP network 6 ina coded format.

When a CT signal 300 is generated by the originator modem 7, theapparatus 10 in the media gateway unit 20 receives a signal from theoriginator modem 7 and by means of the tone detection program element18, attempts to detect the CT signal 300. If the CT signal 300 isdetected, the tone detection program element 18 notifies the mediagateway unit 20 that the connected party from the IP network 6 generateda CT signal and thus identifies it as being an originator modem of adata call. The media gateway unit 20 will then disable the low-bitvocoders so that uncoded data may be passed through the media gatewayunit 20. The media gateway unit 200 will receive an echo of the CTsignal 300, at for example −29 dBm0, which echo signal is represented bythe signal 301 in FIG. 3. When an answer tone signal ANSam 302 isgenerated by the terminator modem 9, the apparatus 10 in the mediagateway unit 200 receives a signal from the terminator modem 7 and bymeans of the tone detection program element 18, attempts to detect theANSam signal 302. If the ANSam signal 302 is detected, the tonedetection program element 18 notifies the media gateway unit 200 thatthe connected party from the PSTN network 8 generated an answer tonesignal ANSam and thus identifies it as being a terminator modem 9. Themedia gateway unit 200 will then switch mode to suppress encoding thesignal and send it from now on in a linear (uncoded) format orlow-compression formats like G.711, A-law, or μ-law. Since the set upsignal from the terminator modem 9 is a ANSam signal with phasereversals, the apparatus 10 in the media gateway unit 200 is arranged todetect the phase reversal(s) and if detected, will notify the mediagateway unit 200 to disable its built-in echo canceller (not shown). Themedia gateway unit 20 receives an echo of the ANSam signal 302, at forexample −38 dBm0, which echo signal is represented by the signal 303 inFIG. 3.

The media gateway units 20, 200 may switch modes in response todetecting a certain tone and/or in response to receiving a switch signalfrom another gateway unit depending on the particular situation. Forexample, in the situation where media gateway unit 20 is a low qualityunit which won't detect CT signal 300 and cannot detect signal 303 sinceit is an echo, media gateway unit 200 might detect the echo signal 301of the CT signal if its level is above a lowest threshold. Otherwise,media gateway unit 200 will detect the ANSam signal 302 and will switchmodes so as to suppress the encoding. The media gateway unit 200 willthen start sending a switch signal (e.g. VBD packets) over the IPnetwork to the media gateway unit 20. Thus, the media gateway unit 20will be informed to switch modes by the media gateway unit 200 sending aswitch signal over the IP network which connects them and the connectionwill proceed as it should. In the situation where media gateway unit 20detects a CT signal 300, the unit 20 will switch and will send a switchsignal to notify the other media gateway unit 200 of the switch throughthe IP network which connects them. Then the media gateway unit 200 willswitch as well either by receiving the switch signal from unit 20 orafter the detection of ANSam signal 302 on its side.

When a V.32 AA handshake signal 304 is generated by the originator modem7, the apparatus 10 in the media gateway unit 20 receives a signal fromthe originator modem 7 and by means of the tone detection programelement 18, attempts to detect the V.32 AA signal 304. If the V.32 AAsignal 304 is detected, the tone detection program element 18 notifiesthe media gateway unit 20 that the connected party from the IP network 6initiated a data call. The media gateway unit 20 will then switch modeto disable the low-bit vocoders so that uncoded data may be passedthrough the media gateway unit 20. The media gateway unit 200 willreceive an echo of the V.32 AA signal 304, at for example −27 dBm0,which echo signal is represented by the signal 305 in FIG. 3.

In an embodiment of the disclosure, as will be described in more detailbelow, the tone detection program elements 18 in each of the mediagateway units 20, 200 are further arranged to detect the echo signals301 and 303.

Thus, in response to detecting at least one of the CT signal 300, theV.32 AA signal 304, and the echo 303 of the ANSam signal 302 by themedia gateway unit 20 and at least one of the ANSam signal 302 and theechos 301, 305 of the CT signal 300 and the V.32 AA signal 304 by themedia gateway unit 200, the mode of the media gateway units 20 and 200can be switched to a mode in which the speech vocoders and echocancellers are disabled (e.g. to VBD mode) before the terminator modem 9or originator modem 7 begins transmitting data represented by 307 (formodem 9) and 306 (for modem 7) in FIG. 3. When both of the media gatewayunits 20 and 200 have switched modes, the data devices 7 and 9 cancommunicate uncoded data directly.

A method and apparatus for detecting one or more predetermined tones orset up or handshake signals in accordance with an embodiment of thedisclosure will now be described with further reference to FIG. 4. Theprocessing unit 12 of apparatus 10 receives a signal at an input 16 of asignal processing block 400 and processes the received signal accordingto the tone detection program element 18. The received signal is in alinear format following decoding in the media gateway unit 2, 20, 200.In an embodiment, the received signal includes a 16 bit linear PCM dataword sampled at 8 kHz and the processing unit 12 processes the receivedsignal in 10 ms frames: that is, the received signal comprises aplurality of frames each of 10 ms duration. The processing block 400processes the received signal and outputs information, includingfrequency information, for detecting predetermined tones.

Broadly, a method for detecting one or more predetermined tonestransmitted over a communication network in accordance with anembodiment of the disclosure comprises dividing a received signal intoat least two frequency sub bands to provide at least two components ofthe received signal in different frequency sub bands, and determining afrequency of each tone in the at least two components and providing anindication that a predetermined tone has been detected when thedetermined frequency of a tone in a component corresponds to thepredetermined frequency of one of the one or more predetermined tones.The frequency sub bands are selected based on the predeterminedfrequencies of the one or more predetermined tones to be detected. In anembodiment, the received signal is divided by at least two filters toprovided at least two filtered components of the received signal. Eachof the at least two filters has a passband which is different to thepassband of the other of the at least two filters. The passbands of theat least two filters are selected based on the predetermined frequenciesof the one or more predetermined tones.

In an embodiment, when at least one predetermined tone has beendetected, an indication is provided that the at least one detectedpredetermined tone is valid when the at least one detected predeterminedtone satisfies a rule. For example, the rule may include a list of validcombinations of predetermined tones. In a situation, when at least onepredetermined tone has been detected, the at least one detectedpredetermined tone is indicated as valid when the combination of the atleast one detected predetermined tone corresponds to a valid combinationin the list. A valid combination may include a predetermined sequence ofat least two predetermined tones.

In another embodiment, the power of the received signal is adjusted byan adjustment block 402 prior to dividing (or filtering) such that anadjusted received signal having a predetermined power is divided intothe at least two components. This ensures that original tone signalswhich are strong signals and echo signals of the original tone signalswhich are weak signals have the same predetermined power which enablesthe echo signals to be detected using the same technique as the originaltone signals. The power may be adjusted by for example adjusting theamplitude of the received signal.

In the embodiment shown in FIG. 4, the adjustment block 402 is anAutomated Level Control (ALC) block 402 and the received signal at input16 is coupled to the ALC block 402 which operates to adjust theamplitude of the received signal to a predetermined level. Theadjustment may be an amplification or an attenuation of the receivedsignal. An indication of the amount of adjustment made by the ALC blockon each received frame is provided at an output 403 of the ALC block aspower level information. In an alternative arrangement, an AutomaticGain Control (AGC) block may be used instead. ALC and AGC blocks arewell known in the art and so no further details shall be providedherein.

The adjustment provided by the ALC block 402 ensures that irrespectiveof whether the tone received is a strong one (e.g. high power andamplitude) or an echo (e.g. low power and amplitude) of a tone, theadjusted received signal at the output of the ALC block 402 has the samelevel of amplitude (power).

An adjusted received signal having a predetermined amplitude at theoutput of ALC block 402 is then provided to a frequency dividercomprising in an embodiment, at least two filters 404. In FIG. 4, threebandpass filters 404 are shown and represented by BF1, BF2, and BF3. Thedotted lines in FIG. 4 indicate that more filters 404 may be used. Thepassbands of the filters BF1, BF2 and BF3 are selected based on thefrequencies of the one or more tones that are to be detected so that thereceived signal is divided into sub-bands for independent processing.The number of filters used depends on the number and frequencies of thedifferent set up signals or tones to be detected. In an embodiment, thenumber of filters and their passbands are determined by first compilinga list of the different tones to be detected. The list may be generated,at the time of design and/or manufacture, from customer input and/orfrom looking at the different relevant standards (e.g. ITU-T V.152provides a list of different fax/modem tones of different standards thatmight be detected but does not include the non-ITU standards such asBell or SIA). The different tones in the list are then mapped onto afrequency spectrum to see where there is any frequency overlap. Thetones are then classified according to when the tones are expected to bereceived: for example, according to whether the tones are to be detectedon an originator or caller side (e.g. such as a CT tone) or a terminatoror answer side (such as a ANSam tone). The aim is to classify the tonesso that the frequency spectrum can be divided into different frequencysub bands with no two tones occurring in the same frequency sub band atthe same time. For example, so no two caller side tones are in the samefrequency band at the same time.

With the three filters BF1, BF2, BF3 shown in FIG. 4 having, forexample, the passbands as set out below, 14 different tones or set upsignals may be detected. Examples, of the 14 tones that can be detectedare also given below.

Example Filter pass bands:

BF3-2000-2400 Hz

BF2-1600-1900 Hz

BF1-900-1500 Hz

Example Tones:

ANS/ANSam—as specified in ITU-T V.25/V.8bis

CT tone—as in ITU-T V.25

V.23 mark frequency—as in ITU-T V.23

V.8 CM and JM—as in ITU-T V.8bis

V.32 AA—as in ITU-T V.32/V.32bis

V.22/V.22bis guard tone—as in ITU-T V.22/V.22bis

Bell 212 answer tone—Bell 212 standard

Bell 103 terminator mark frequency—Bell 103 standard

Bell 103 originator mark frequency—Bell 103 standard

SIA handshake tones—as defined in SIA DC02 and SIA DC05 standards

Fax V.21 high channel frequencies—as in ITU-T V.21

Fax V.21 low channel frequencies—as in ITU-T V.21

Fax 1100 Hz tone (CNG)—as in ITU-T T.30

USB1—as in ITU-T V.22/V.22bis

In an embodiment, the power level of a tone is used in addition to thefrequency to detect and identify the tone in a sub band.

The list of predetermined tones, which in an embodiment includes theoriginal tone and its echo, to be detected, the frequency and powerlevel of each of the predetermined tones to be detected are stored in alook-up table in data memory 14. In addition, the tolerance values forthe frequency and power levels of each of the predetermined tones arealso stored so that, for example, if a tone is detected as having afrequency which falls within the tolerance value of the frequency of apredetermined tone, then the tone will be detected as the predeterminedtone.

If a new tone is to be added to the list of predetermined tones to bedetected, the frequency of the new tone is mapped onto the frequencyspectrum to see whether there is any frequency overlap with the existingtones. If the new tone falls within the same frequency sub band asanother tone, provided that the new tone will not be received at thesame time (e.g. one tone is on the caller side and the other tone is onthe answer side), then the new tone may be simply added to the list. Ifthe frequency of the new tone does fall within the same frequency subband and occurs at the same time, then the frequency sub band will haveto be divided into two sub bands. This can be achieved by programming ofappropriate parameters in the factory or in situ.

It will be appreciated that instead of bandpass filters other types offilters, such as a bank of peaking filters may be used. This might beuseful when there are just a few tones in a sub-band to be detected. Itwill therefore be appreciated that any kind of filtering technique maybe used that separates the useful tones from the rest.

An output of each of the filters 404 is coupled to a respectivefrequency discriminator block 410. Each of the frequency discriminatorblocks 410 determines a frequency of the one or more tones present inthe sub band of the filtered signal at the output of the respectivefilter 404. In the embodiment shown in FIG. 4, each discriminator block410 comprises an adjustment block such as an Automated Level Control(ALC) block 406 and a Phase Locked Loop (PLL) 408. The ALC block 406operates to adjust the power of the received signal to a predeterminedlevel and the adjustment may be an amplification or an attenuation ofthe received signal. An indication of the amount of adjustment made byeach ALC block 406 is provided at a first output 407 of the ALC block406 as sub band power level information. A second output 409 of each ofthe adjustment blocks 406 is coupled to a respective PLL 408. Each ofthe frequency discriminators shown in FIG. 4 includes an ALC block 406so as to compensate for any attenuation caused by the respective filter404 and so as to provide a constant power or amplitude at the input ofthe respective PLL 408. It will be appreciated that additionalinformation, such as phase, may also be extracted by the PLL 408 foreach detected tone in the respective sub band. The implementation ofPLLs are well known in the art and no further details are given herein.It will however be appreciated that frequency discriminators other thanPLLs may instead be used.

Thus, the output of filter BPF1 is coupled to adjustment block ALC1having a first output 407 for providing power level information for subband 1 and a second output 409 coupled to PLL1 408, the output of filterBPF2 is coupled to adjustment block ALC2 having a first output 407 forproviding power level information for sub band 2 and a second output 409coupled to PLL2 408 and the output of filter BPF3 is coupled toadjustment block ALC3 having a first output 407 for providing powerlevel information for sub band 3 and a second output 409 coupled to PLL3408. The value of the adjustments made by the different adjustmentblocks ALC1, ALC2, ALC3 may be different for each adjustment blockdepending on what tones are present in the different the bands at anygiven time.

The power level information at the output 407 of each of the ALC blocks406 and the output of each of the PLLs 408 are coupled to a decisionlogic block 416 which includes a plurality of sub band decision logicblocks 412. Each of the sub band decision logic blocks 412 correspondsto a respective one of the sub bands. Sub band 1 decision logic block412 provides an indication that a predetermined tone in sub band 1 hasbeen detected when the frequency of a tone in sub band 1 as determinedin PLL1 408 corresponds to the frequency of one of the predeterminedtones as listed in the look up table held in data memory 14. In anembodiment, the power level information for sub band 1 provided at theoutput 407 of the ALC1 block 406 is also used to identify the tone whosefrequency has been detected by PLL1 408. So, for example, the frequencyof the detected tone in sub band 1 as indicated at the output of thePLL1 408 and the power level of the detected tone as indicated by theoutput 407 of the ALC1, is compared with the data in the look-up tableheld in the data memory 14 to see what predetermined tone in the look-uptable has the same frequency and power level. If there is a match or atleast the detected frequency and power levels are within statedtolerance values of one of the predetermined tones in the look-up table,then the detected tone corresponds to the predetermined tone listed inthe look-up table and the sub band 1 decision logic block 412 canindicate that a predetermined tone has been detected. The other sub banddecision logic blocks 412 for sub bands 2 and 3 operate in a similarmanner.

An output of each of the sub band decision logic blocks 412 and thepower level information at the output 403 of ALC block 402 are coupledto an overall decision logic block 414. The overall decision logic block414 receives tone information from the signal processing block 400 ineach of the sub bands and indicates that a detected predetermined toneis valid when the detected predetermined tone satisfies a rule. In anembodiment, the rule includes a list of valid combinations ofpredetermined tones and in the event the overall decision logic block414 receives tone information indicating that at least one predeterminedtone has been detected, the output of the overall decision logic block414 indicates the at least one detected predetermined tone is valid whenthe combination of the at least one detected predetermined tonecorresponds to a valid combination. A valid combination may include apredetermined sequence of at least two predetermined tones. The rule(s)are held in the date memory 14. In other words, the overall decisionlogic block 414 receives tone information from the signal processingblock 400 in each of the sub bands and establishes the event (e.g.detection of a valid CT signal) that occurred by matching knowndetection patterns to the detected sequence of tones.

The processing unit 12 processes the information provided at the outputof the overall decision logic block 414 and then sends event triggers toan Application Programming Interface (API) (not shown), if necessaryaccording to the results of the processing. The media gateway unit 2,20, 200, responds to the event triggers for example by switching modes(e.g. to the VBD mode), or by disabling its internal echo cancellers(not shown).

Since the method and apparatus for detecting one or more predeterminedtones in accordance with the disclosure can detect a plurality ofdifferent tones, the overall decision logic block 414 is used to ensurethat the detected tones meet logical rules so that a switching of modesin the media gateway unit is triggered in response to a correct event.For example, if a fax/modem standard specifies that when a tone A isgenerated by a caller side or originator data device, a tone B should begenerated by an answer side or terminator data device, then the ruleheld in the data memory will indicate that the combination of tone Awith tone B is a valid combination. In the event the tone detectionprogram elements 18 in the media gateway units detect a predeterminedtone A and a predetermined tone Y, the overall decision logic block 414will check the rule and in response will indicate that this combinationis not valid and the media gateway units will disregard the detectedtones A and Y.

As described briefly above, the media gateway units are thus arranged toswitch modes in response to the detection of a particular tone or inresponse to receiving a switch signal from another media gateway unit.When switching is initiated (i.e. in response to a tone signal or aswitch signal) will depend on a particular situation and the ability ofthe media gateway unit to detect tone signals which is determined by thequality of the media gateway unit itself.

For example, in one case when the caller media gateway unit detects theCT tone signal and it starts sending a switch signal in VBD specificpackets to the answer media gateway unit, upon the receiving of theswitch signal, the answer media gateway unit will switch to VBD if ithadn't already detected the ANS tone signal on its side. Sometimes, dueto the delays in the IP networks, the VBD packets from the caller mediagateway unit might arrive after the answer media gateway unit hasalready detected the ANS tone signal and already switched in VBD. Ineither case presented here, the fax/modem connection has a high chanceof proceeding successfully.

In the case where the caller media gateway unit is just a poorimplementation in terms of tone detection (and it does not implement themethod in accordance with the present disclosure) and it doesn't detectthe CT tone signal, whereas the answer media gateway unit does implementthe method in accordance with the present invention, if the echo of theCT signal arriving at the answer media gateway unit is above thedetection threshold, the tone detector of the answer media gateway unitin accordance with the present disclosure will discriminate it and itwill inform the gateway to switch to VBD. Once the answer media gatewayunit has switched, it will start sending a switch signal in VBD specificpackets to the caller media gateway unit. Upon the receipt of these VBDpackets, the caller media gateway unit will switch to VBD as well. Ifhowever the echo of the CT signal arriving at the answer media gatewayunit is below the detection threshold, the tone detector in accordancewith the disclosure will not detect it. Instead, it will detect the ANStone signal and it will inform the answer media gateway unit to switchto VBD. Once the answer media gateway unit has switched, it will startsending VBD specific packets to the caller media gateway unit. Upon thereceipt of these VBD packets, the caller media gateway unit will switchto VBD as well.

Thus, it will be appreciated from these different cases, the fax/modemconnection has many chances of succeeding due to the improved detectionmethod in accordance with the present disclosure. By using the methodand apparatus for detecting tone signals in accordance with thedisclosure in a media gateway unit, the media gateway unit will be ableto achieve very good performances (in terms of connection reliability)even when connected with older or poor implementations of the mediagateway units.

The date held in the data memory 14 may indicate that the echo signalsof original tones may be ignored.

The operation of the apparatus and method for detecting one or moretones in accordance with the disclosure will now be further describedwith respect to detecting an example tone, the CT signal (signal 300 inFIG. 3) which CT signal has a frequency of 1300 Hz and a power level of−13 dBm0.

On receipt of a signal including a CT signal, the ALC block 402 willdetermine that the CT signal is a strong signal and so that only arelatively small (e.g. small compared to an echo signal of the CT tone)amplification of the received signal to the predetermined level isrequired. The amount of amplification required is provided as powerlevel information at the output 403 of the ALC block 402. The amplifiedreceived signal is then provided to the three filters, BPF1, BPF2 andBPF3. The frequency of the CT signal falls within the passband of thefilter BPF1 and thus a filtered component having an amplitude will beprovided at the output of BPF1 whereas the filtered components at theoutput of the filters BPF2 and BPF3 will have a low (possibly zero)amplitude. The filtered components are then passed through the ALCblocks ALC1, ALC2 and ALC3. The power level information provided at theoutputs 407 of the ALC blocks ALC2 and ALC3 will indicate that thefiltered components at the outputs of the filters BPF2 and BPF3 havevery low power and thus, the decision logic block 416 can ignore thetone information for sub bands 2 and 3 when processing the toneinformation. ALC1 block 406 amplifies the filtered components at theoutput of the filter BPF1 and provides power level information at itsoutput 407 indicating that the filtered component amplified by ALC1block 406 includes a tone in the sub band 1 having a power level of −13dBm0. The PLL1 then determines that a tone signal at 1300 Hz is presentin the filtered component. The frequency information at the output ofthe PLL1 and the power level information at the output 407 of the ALC1is provided to the sub band 1 decision logic block 412. The sub band 1decision logic block 412 looks in the look-up table to see whether apredetermined tone in the table has a frequency of 1300 Hz and a powerlevel of −13 dBm0 and matches the received tone information to a CTsignal in the look-up table. The overall decision logic block 414receives the power level information from the ALC block 402 and theoutputs of the sub band decision logic blocks 412 and determines that aCT signal has been detected in sub band 1 but no other tone has beendetected in the other sub bands 2 and 3. On checking the rules, theoverall decision logic block 414 will then determine that a CT signal onits own is a valid combination and thus, that a valid CT signal has beendetected. The valid detection of a CT signal will then be used by theprocessing unit to trigger an event such as a switch to VBD mode.

Thus, in the example shown in FIG. 3, if the media gateway unit 20coupled to the originator data device 7 detects the CT signal 300 bymeans of the method and apparatus for detecting tones in accordance withthe disclosure and the media gateway unit 200 coupled to the terminatordata device 9 detects the echo 301 of the CT signal 300 by means of themethod and apparatus for detecting tones in accordance with thedisclosure, the media gateway units 20 and 200 can be switched to a VBDmode in response to the detection of the CT signal 300 and echo 301 ofthe CT signal 300 respectively quickly before the ANSam signal 302 isreceived by the media gateway unit 200 so that the ANSam signal 302, theecho 303 of the ANSam signal 302 are received by the media gateway units20 and 200 in VBD mode before the data transmission starts asrepresented by 306.

It will be appreciated that for voice calls, the tone detector apparatusand method in accordance with the disclosure will not detect anypredetermined tones.

In summary, the present disclosure provides a method and apparatus fordetecting one or more tones by dividing the received signal into atleast two frequency sub bands, processing the components in the subbands separately and then using the resulting information from thedifferent subs bands to determine whether one or more validpredetermined tones has been detected. The number and distribution ofthe of sub bands is dependent on the number and frequency of the tonesto be detected. The method and apparatus in accordance with thedisclosure thus provides a simple solution to detecting a number ofdifferent tones according to different standards quickly (for example 20ms but in the embodiment described above, the time depends on the howthe PLLs 408 and the decision logic block 416 are tuned). By detectingthe different predetermined tones quickly, the mode of the media gatewayunit can be switched quickly which results in less failed connections.

The known systems, such as that described in U.S. Pat. No. 6,708,146,need much more time to discriminate and detect tones compared to themethod in accordance with the present disclosure.

Furthermore, the method and apparatus for tone detection in accordancewith the disclosure can detect a tone from its echo and thus, enables insome cases for the media gateway unit to switch modes quicker than inthe known arrangements which can only detect the original signals.Furthermore, by being able to detect and switch on echo signals, themethod and apparatus for tone detection in accordance with thedisclosure can operate anywhere in relation to the echo cancellers onthe telephony lines and do not have to rely on the echo cancellers beingoperational before tone signals can be reliably detected. In some knownarrangements, the tone detector is placed behind the echo canceller andthe tone detector has to wait for the echo canceller to be operatingproperly to cancel the echos (between 300-400 ms) before the tonedetector can detect the tones. In some cases, this delay is too long andmodem data is communicated before the mode of the media gateway unit isswitched, which can result in a failed connection.

The method and apparatus in accordance with the present disclosure isable to detect tones that are severely distorted and attenuated andthus, can take account of the subscriber line affects which arise inreal-life (e.g. attenuation, cross-talk, noise) which are not consideredby the known tone detectors. By using certain signal processing modules(e.g. PLL, BPF, ALC) backed-up by certain rules in the decision logicblocks, the presented apparatus is able to detect certain tones with anSNR as low as 5 dB. The attenuation variation is handled by the ALCblocks. The resilience to cross-talk interference is handled by the PLLsand the sub band decision logic blocks which are able to eliminate falseevents, resulted from cross-talk.

The method in accordance with the present disclosure therefore enables alarge number of different tones to be detected without the need fordedicated arrangements for each tone or family of tones. This provides aflexible, cost effective and robust solution for data communicationinterworking across networks supporting both data and voicecommunications.

The media gateway unit may have one or more than one channel forcommunicating over one or more than one communication link. In theevent, the media gateway unit has more than one channel, the mediagateway unit includes a tone detection apparatus in accordance with thedisclosure for each channel.

The method and apparatus for tone detection in accordance with thedisclosure was tested with different modem devices, such as devicessupplied by US Robotics, Conexant, Motorola, Copeland according tovarious ITU, Bell and SIA modem standards and over a number of differentsubscriber lines such as NULL, ETS12, EIA5, EIA6, EIA7 with the resultthat 0% false detections were provided.

In the foregoing specification, the invention has been described withreference to specific examples of embodiments of the invention. It will,however, be evident that various modifications and changes may be madetherein without departing from the broader scope of the invention as setforth in the appended claims.

It will be appreciated that, insofar as embodiments of the invention areimplemented by a computer program, then a storage medium and atransmission medium carrying the computer program form aspects of theinvention. The computer program may for instance include one or more of:a subroutine, a function, a procedure, an object method, an objectimplementation, an executable application, an applet, a servlet, asource code, an object code, a shared library/dynamic load libraryand/or other sequence of instructions designed for execution on acomputer system or processing device. The transmission medium may be aCD-rom, diskette or a data connection, such as a telephone cable or anIP connection.

Some of the above embodiments, as applicable, may be implemented using avariety of different processing systems. For example, although FIGS. 4and 5 and the discussion thereof describe an exemplary system, thisexemplary architecture is presented merely to provide a useful referencein discussing various aspects of the invention. Of course, thedescription of the architecture has been simplified for purposes ofdiscussion, and it is just one of many different types of appropriatearchitectures that may be used in accordance with the disclosure. Thoseskilled in the art will recognize that the boundaries between logicblocks are merely illustrative and that alternative embodiments maymerge logic blocks or impose an alternate decomposition of functionalityupon various logic blocks.

The invention claimed is:
 1. A method comprising: receiving, at agateway configured to couple a first network to a second network, asignal transmitted over the first network; dividing the signal into twodifferent components, each component being associated with a differentfrequency sub band, wherein each frequency sub band is selected toinclude a predetermined frequency of a predetermined tone; determining afirst frequency of a first tone in a first component; determining thatthe first frequency corresponds to a first predetermined tone; andproviding a first indication that the first predetermined tone has beendetected in response to determining that the first frequency correspondsto the first predetermined tone.
 2. The method of claim 1, furthercomprising: switching an operating mode of the gateway in response tothe first indication, wherein the operating mode is to provide thesignal over the second network.
 3. The method of claim 2, wherein theoperating mode includes at least one of an encoding mode, a vocodermode, an echo-canceller mode, and a voiceband data mode.
 4. The methodof claim 1, further comprising: determining that the first predeterminedtone satisfies a rule in response to providing the first indication; andproviding a second indication that the at first predetermined tone isvalid in response to determining that the first predetermined tonesatisfies the rule.
 5. The method of claim 4, wherein: the rule includesa list of valid combinations of predetermined tones; the method furthercomprises: determining a second frequency of a second tone in a secondcomponent; determining that the first frequency corresponds to a firstpredetermined tone; determining that a combination of the firstpredetermined tone and the second predetermined tone corresponds to avalid combination; and providing a third indication that the combinationsatisfies the rule.
 6. The method of claim 4, wherein a the validcombination includes a predetermined sequence of at least twopredetermined tones.
 7. The method of claim 1, wherein in dividing thesignal the method further comprises: filtering the signal by two filterssuch that each component is provided at an output of one of the filters,wherein each filter has a passband different from the passband of theother of the filters, and wherein each passband is selected tocorrespond to one of the frequency sub bands.
 8. The method of claim 1,further comprising: adjusting a power level of the signal to apredetermined power level.
 9. The method of claim 1, further comprising:adjusting a power level of each component to a predetermined powerlevel.
 10. The method of claim 1, wherein: each predetermined tone has apredetermined power level; and the method further comprises: determininga first power level of the first tone; and providing the firstindication is in further response to determining that the first powerlevel corresponds to the predetermined power level.
 11. The method ofclaim 1, wherein the first network comprises one of a private branchexchange network, a public switched telephone network, and an Internetprotocol network.
 12. A gateway comprising: a first network interface;and an apparatus for detecting predetermined tones transmitted, theapparatus comprising: an input to receive a signal transmitted over thefirst network interface; a frequency divider to divide the signal intotwo different components, each component being associated with adifferent frequency sub band, wherein each frequency sub band isselected to include a predetermined frequency of a predetermined tone; afrequency discriminator to determine frequencies of tones in thecomponents; and a decision logic block to provide a first indicationthat a first predetermined tone has been detected when a firstdetermined frequency of a first tone in a first component corresponds toa first predetermined frequency of the first tone.
 13. The gateway ofclaim 12, further comprising, further comprising: a second networkinterface; wherein the apparatus is operable to switch an operating modeof the gateway in response to the first indication, wherein theoperating mode is to provide the signal over the second networkinterface.
 14. The gateway of claim 13, wherein the operating modeincludes at least one of an encoding mode, a vocoder mode, anecho-canceller mode, and a voiceband data mode.
 15. The gateway of claim12, wherein the decision logic block is further to provide, in responseto the first indication, a second indication that the firstpredetermined tone is valid when the first predetermined tone satisfiesa rule, wherein the rule includes a list of valid combinations ofpredetermined tones.
 16. The gateway of claim 15, wherein the decisionlogic block is further to: provide the first indication when a seconddetermined frequency of a second tone in a second component correspondsto a second predetermined frequency of the second tone; and provide athird indication when a combination of the first tone and the secondtone.
 17. The gateway of claim 12, wherein: each predetermined tone hasa predetermined power level; and the apparatus further comprises anadjustment block to determine a power level of tones in the components;and the decision logic is to provide the first indication in furtherresponse to determining that a first power level of the first tonecorresponds to a first predetermined power level.
 18. The gateway ofclaim 12, wherein the first network comprises one of a private branchexchange network, a public switched telephone network, and an Internetprotocol network.
 19. A method comprising: receiving, at a gatewayconfigured to couple a first network (PSTN) to a second network, asignal transmitted over the first network; selecting at least twofrequency sub bands, the selecting further comprising: identifying aplurality of predetermined tones to be detected, each tone having apredetermined frequency; mapping the predetermined tones onto afrequency spectrum; classifying the predetermined tones by when thetones are expected to be received; and dividing the frequency spectruminto frequency sub bands based on the mapping and the classifying, suchthat no two tones that are expected to be received at the same time havefrequencies in the same frequency sub band; dividing the signal into thefrequency sub bands to provide at least two components of the signal indifferent frequency sub bands; determining a first frequency of a firsttone in a first component; and providing an indication that apredetermined tone has been detected when the first frequencycorresponds to predetermined frequency of the first tone.
 20. The methodof claim 19, further comprising: switching an operating mode of thegateway in response to the first indication, wherein the operating modeis to provide the signal over the second network.